# -*-Makefile-*-
#
# Common makefile template for rtinst library.  This file is not
# intended to be a useful Makefile in isolation; instead, it should be
# included from within an architecture-specific Makefile.
#
# $Id: make.module.tmpl,v 1.5 2008/03/12 20:09:43 legendre Exp $
#

# This is from the point of view of the build directories... so ../
MUTATEE_SRCS    = ../src/RTshared-unix.c

MUTATOR_SRCS    =       ../src/shmMgr.C \
                        ../src/shmSegment.C \
                        ../src/shmSegment-unix.C

MUTATEE_OBJS	= RTshared-unix.o
MUTATOR_OBJS	= shmMgr.o \
		  shmSegment.o \
		  shmSegment-unix.o

TO_INC = ../h
PUBLIC_H = SharedMem.h


SRCS = $(MUTATOR_SRCS)

TO_ROOT = ../../..
CXXFLAGS += -I$(TO_ROOT)/dyninstAPI/h -I$(TO_ROOT) -I$(TO_ROOT)/dynutil/h -I$(TO_ROOT)/symtabAPI/h -I$(TO_ROOT)/instructionAPI/h -fPIC
CFLAGS += -I$(TO_ROOT)/dyninstAPI/h -I$(TO_ROOT) -I$(TO_ROOT)/dynutil/h -I$(TO_ROOT)/symtabAPI/h -fPIC -I$(TO_ROOT)/instructionAPI/h

TARGETS = libdynShmMutatee.so libdynShmMutator.so

all: $(TARGETS)

# Override the install script - we have two files
OVERRIDE_INSTALL = true

install: $(TARGETS) install_generic
	-$(INSTALL) $(TARGETS) $(DEST)

libdynShmMutatee.so: $(MUTATEE_OBJS)
	$(LD) $(LDFLAGS) $(LDFLAGS_MUTATEE) -o libdynShmMutatee.so $(MUTATEE_OBJS)
libdynShmMutator.so: $(MUTATOR_OBJS)
	$(LD) $(LDFLAGS) -o libdynShmMutator.so $(MUTATOR_OBJS) $(MUTATOR_LIBS) $(LDFLAGS_MUTATOR)



MODCC         = $(CC)
MODCFLAGS     = $(CFLAGS)





#
# override standard install rule; provide a default DEST if not already set
#
ifndef DEST
DEST		= $(LIBRARY_DEST)
endif

